<template>
  <div></div>
</template>
<script>
import { GetUrlParame } from "@/utils/utils";
export default {
  name: "inThere",
  components: {},
  data() {
    let that = this;
    return {};
  },
  created() {
    let inviterId = GetUrlParame("inviterId");
    let inviterType = GetUrlParame("inviterType");
    let campusId = GetUrlParame("campusId");
    let oid = GetUrlParame("oid");
    let state =
      "inviterId" +
      inviterId +
      "gs" +
      "inviterType" +
      inviterType +
      "gs" +
      "campusId" +
      campusId +
      "gs" +
      "oid" +
      oid;
    let redirect_url = `https://www.xiaoguobx.com/prod-api/wechat/applet/code/`;
    let link = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx9db21eb59b070dec&redirect_uri=${redirect_url}&response_type=code&scope=snsapi_base&state=${state}&tag=XG#wechat_redirect`;
    window.location.href = link;
  },
  mounted() {},

  methods: {
    isWeiXin() {
      //检测环境是否为微信
      let ua = window.navigator.userAgent.toLowerCase();
      return ua.match(/MicroMessenger/i) == "micromessenger";
    }
  }
};
</script>
